import * as http from "@/utils/request"

/**
 * 后台登录
 * @returns Promise
 */
export function login(username,password) {
  return http.post('/api/admin/User/Login',{username,password});
}

/**
 * 登出
 * @returns Promise
 */
 export function logout() {
  return http.get('/api/admin/User/Logout');
}

/**
 * 身份验证
 * @returns Promise
 */
export function authentication() {
  return http.get('/api/admin/User/Authentication',null,false);
}


/**
 * 修改密码
 * @returns Promise
 */
 export function changePassword(params) {
  return http.post('/api/admin/User/ChangePassword',params);
}

/**
 * 获取用户名
 * @returns Promise
 */
 export function getUserName() {
  return http.get('/api/admin/User/GetUserName');
}
